Q3Quaternion_InterpolateLinear
You can use theQ3Quaternion_InterpolateLinear
function to interpolate linearly between two quaternions.
TQ3Quaternion *Q3Quaternion_InterpolateLinear ( const TQ3Quaternion *q1, const TQ3Quaternion *q2, float t, TQ3Quaternion *result) ;
q1
- A quaternion.
q2
- A quaternion.
t
- An interpolation factor. This parameter should contain a value between 0.0 and 1.0.
result
- On exit, a quaternion that is a smooth and constant interpolation between the two specified quaternions.
DESCRIPTION
TheQ3Quaternion_InterpolateLinear
function returns, as its function result and in theresult
parameter, a quaternion that interpolates smoothly between the two quaternions specified by theq1
andq2
parameters, according to the factor specified by thet
parameter. If the value oft
is 0.0,Q3Quaternion_InterpolateLinear
returns a quaternion identical toq1
. If the value oft
is 1.0,Q3Quaternion_InterpolateLinear
returns a quaternion identical toq2
. Ift
is any other value in the range [0.0, 1.0],Q3Quaternion_InterpolateLinear
returns a quaternion that is interpolated between the two quaternions in a smooth and constant manner.